package com.tianqu.tms.core.security;

import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.core.util.Registry;
import com.tianqu.tms.core.util.TmsConstants;

/**
 * 
 * @author liugang
 *
 */
public abstract class AccessController implements TmsConstants {

	/**
	*AccessController
	* @return  AccessController
	*/
	public static AccessController getInstance() {
		return (AccessController) Registry.get(ACCESS_CONTROLLER);
	}

	/**
	 * 
	 * @param userProfile
	 * @param funcId
	 * @return
	 * @throws TmsException
	 */
	public abstract boolean checkPermission(TmsUserProfile userProfile,
			String funcId)
			throws TmsException;
	}